/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Project;

import Common.IAttribute;
import Common.IAttributeCollection;
import Common.IUnit;
import java.util.HashMap;
import java.util.Iterator;


/**
 *
 * @author Администратор
 */
public class AttributeCollection extends HashMap<String, IAttribute> implements IAttributeCollection
{
    IUnit owner;
    int current;
    public AttributeCollection(IUnit owner){
        this.owner = owner;
        current =0;
    }

    public IAttribute getAttribute(String name) {
        return this.get(name);
    }
    public void setAttribute(String name, IAttribute attribute)
    {
        this.put(name, attribute);
    }

    public Iterator<IAttribute> iterator() {
        return ((IAttributeCollection)this).iterator();
    }

}